package com.jadows.tdog.server.option;

import com.jadows.tdog.enums.ConnectStateEnum;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author taojiacheng
 */
@Data
@Accessors(fluent = true)
public class ServerOption {

    private final String host;
    private final int port;

    private ConnectStateEnum state = ConnectStateEnum.INIT;

    private int connectTimes = 0;

    public String address() {
        return host + ":" + port;
    }

    /**
     * <p>addConnectTimes.</p>
     */
    public void addConnectTimes() {
        connectTimes++;
    }
}
